package com.yangff.listener;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yangff.entity.product.entity.Fundnetvalue;
import com.yangff.entity.product.entity.dto.FundnetvalueDTO;
import com.yangff.entity.vo.ResultVo;
import com.yangff.service.IFundnetvalueService;
import lombok.RequiredArgsConstructor;
import org.springframework.amqp.core.ExchangeTypes;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

@Component
@RequiredArgsConstructor
public class FundnetvalueListener {
    private final IFundnetvalueService fundnetvalueService;

    @RabbitListener(
            bindings = @QueueBinding(
                    value = @Queue(name = "fundnetvalue.queue"),
                    exchange = @Exchange(name = "fts.direct",type = ExchangeTypes.DIRECT),
                    key = "list"
            )
    )
    public void ListFundNetValue(@RequestBody FundnetvalueDTO fundnetvaluedto){
        fundnetvalueService.ListFundNetValue(fundnetvaluedto);
    }


}
